var request = window.axios;
export const query = (params) => request({
  url: "/jetlinks/visualization/_query",
  method: 'GET',
  params: params
});

export const getObj1 = (id) => request({
  url: "/jetlinks/visualization/" + id,
  method: 'GET'
});

export const updateComponent = (id, data) => request({
  url: '/jetlinks/visualization/'+ id,
  method: 'PUT',
  data: data
});
//获取设备列表
export const deviceList = (params) => request({
  url: '/jetlinks/device-instance/_query',
  method: 'get',
  params
})

export const deviceListNoPage = (params) => request({
  url: '/jetlinks/device-instance/_query/no-paging?paging=false',
  method: 'get',
  params
})

export const productListNoPage = (params) => request({
  url: '/jetlinks/device-product/_query/no-paging',
  method: 'get',
  params
})

//获取属性列表
export const propertyList = (id) => request({
  url: '/jetlinks/device/instance/'+id+'/detail',
  method: 'get'
})

//获取视频流设备
export const getVideoDeviceListNoPaging = () => request({
  url: '/jetlinks/media/device/_query/no-paging',
  method: 'get'
})
//获取通道
export const getVideoChannelListNoPaging = (params) => request({
  url: '/jetlinks/media/channel/_query/no-paging',
  method: 'get',
  params
})
//播放
// export const startVideo = (deviceId, channelId) => request({
//   url: '/jetlinks/media/device/'+ deviceId +'/'+ channelId+'/_start',
//   method: 'post'
// })

